<?php
		require_once "funciones.php";
		$link_caweb = con_caweb();

		$q=$_POST["q"];
//		$transaccion = $_SESSION['caweb']['consecutivo'];

		$link_caweb = con_caweb();
		
		$result ="SELECT * FROM taxonomia WHERE codigosubclase='$q' GROUP BY familia";
        $result= mysql_query($result,$link_caweb) or die('Error taxonomia, '.mysql_error());

		echo "Familia: <select name='familia' size='1' id='familia' onchange='
		    $(\"#layer5_grupos_tarifas\").load(\"layer5_grupos_tarifas.php\",{q:this.value});
		    $(\"#codigotaxtarifa\").attr(\"value\",this.value);
			'>";

        
		echo "<option value='XXX' SELECTED>Seleccionar..</option>";
        while($row = mysql_fetch_array($result))
        {
        	echo "<option value=".$row[familia].">".$row[descripcionfam]."</option>";
        }
        echo "</select>";
?>